const shake =(handler,time)=>{
    let timer 
    return function(){
        clearTimeout(timer)
        timer=setTimeout(()=>{
            handler.call(this,...arguments)
        },time)
    }
}

export default shake